<template>
    <el-row class="tac">
        <el-col :span="35">
            <el-menu default-active="2" class="el-menu-vertical-demo">
                <el-menu-item index="1">
                    <el-icon><icon-menu /></el-icon>
                    <span @click="toManageAddress()">我的地址</span>
                </el-menu-item>
                <el-menu-item index="2">
                    <el-icon><icon-menu /></el-icon>
                    <span @click="toShoppingCartList()">我的购物车</span>
                </el-menu-item>
                <el-menu-item index="3">
                    <el-icon><icon-menu /></el-icon>
                    <span @click="toOrdersList()">我的订单</span>
                </el-menu-item>
                <el-menu-item index="4">
                    <el-icon><icon-menu /></el-icon>
                    <span @click="toUserInfo()">我的信息</span>
                </el-menu-item>
            </el-menu>
        </el-col>
    </el-row>
</template>
  
<script lang="ts" setup>
import { useRouter } from 'vue-router'
import {
    Document,
    Menu as IconMenu,
    Location,
    Setting,
} from '@element-plus/icons-vue'
// const handleOpen = (key: string, keyPath: string[]) => {
//   console.log(key, keyPath)
// }
// const handleClose = (key: string, keyPath: string[]) => {
//   console.log(key, keyPath)
// }

const router = useRouter()

function toManageAddress(){
    router.push("manageaddress")
}
function toShoppingCartList(){
    router.push("shoppingcartlist")
}
function toOrdersList(){
    router.push("orderslist")
}
function toUserInfo(){
    router.push("userinfo")
}

</script>
  